home *** CD-ROM | disk | FTP | other *** search
/ Amiga Desktop Video CD / Amiga DeskTop Video CD.iso / install / mui / mui-install < prev    next >
Text File  |  1994-11-13  |  11KB  |  512 lines

  1. ;***** MagicUserInterface Installation Script
  2.  
  3. (transcript "Installing Magic User Interface...")
  4. (set @default-dest "SYS:")
  5.  
  6. ;***** Introduction
  7. (complete 0)
  8.  
  9. (message
  10.     "The installation procedure has changed significantly since version 2.0 of "
  11.     "MagicUserInterface. Instead of spreading the MUI related files all "
  12.     "over your system, one single MUI directory will be created at some place "
  13.     "of your choice. This directory will hold all necessary programs and "
  14.     "libraries for a complete MUI installation. Depending on the available "
  15.     "space on your harddisk, you may decide to install additional "
  16.     "demonstration programs, documentation material and images."
  17. )
  18.  
  19. ;***** Old File Deletion
  20. (complete 5)
  21.  
  22. (if (<> (exists "sys:classes/mui") 0)
  23. (
  24.     (if (askbool (help @askbool-help) (prompt "Some old MUI stuff is in your libs: drawer. Do you want to delete it now?"))
  25.     (
  26.         (if (<> (exists "sys:libs/muimaster.library") 0)
  27.         (
  28.             (delete
  29.                 ("sys:libs/muimaster.library")
  30.                 (prompt "Deleting old muimaster.library...")
  31.                 (help @deletefile-help)
  32.             )
  33.         )
  34.         )
  35.  
  36.         (foreach "sys:Classes/MUI" "#?.mui"
  37.             (delete
  38.                 (tackon "sys:Classes/MUI" @each-name)
  39.                 (help @deletefile-help)
  40.             )
  41.         )
  42.  
  43.         (if (<> (exists "sys:Classes/Images") 0)
  44.         (
  45.             (foreach "sys:Classes/Images" "mui#?.image"
  46.                 (delete
  47.                     (tackon "sys:Classes/Images" @each-name)
  48.                     (help @deletefile-help)
  49.                 )
  50.             )
  51.         )
  52.         )
  53.  
  54.         (delete
  55.             ("sys:Classes/MUI")
  56.             (help @deletefile-help)
  57.         )
  58.     )
  59.     )
  60. )
  61. )
  62.  
  63. (if (<> (exists "sys:prefs/mui") 0)
  64. (
  65.     (if (askbool (help @askbool-help) (prompt "The old preferences program is obsolete. Do you want to delete it now?"))
  66.     (
  67.         (delete
  68.             ("sys:Prefs/MUI")
  69.             (help @deletefile-help)
  70.         )
  71.         (delete
  72.             ("sys:Prefs/MUI.info")
  73.             (help @deletefile-help)
  74.         )
  75.     )
  76.     )
  77. )
  78. )
  79.  
  80. (if (<> (exists "sys:prefs/MUI-Images") 0)
  81. (
  82.     (if (askbool (help @askbool-help) (prompt "The images in sys:prefs/MUI-Images have moved. Do you want to delete it now? CAUTION: If you have added some extra images here, be sure to copy them somewhere else before proceeding!"))
  83.     (
  84.         (run "delete sys:Prefs/MUI-images#? all >nil:")
  85.     )
  86.     )
  87.  
  88.     (if (askbool (help @askbool-help) (prompt "Due to the new directory structure, your old preferences settings are no longer valid and must be deleted. This will not affect window positions and application private settings. Please don't worry, instead take a look at the prefs program's preset menu when reconfiguring MUI. Do you want to delete the old settings now?"))
  89.     (
  90.         (run "delete envarc:mui/#?.prefs >nil:")
  91.         (run "delete envarc:mui/MUIPREFS.cfg >nil:")
  92.     )
  93.     )
  94. )
  95. )
  96.  
  97. (if (<> (exists "sys:locale/catalogs/Deutsch/MUI.catalog" (noreq)) 0)
  98. (
  99.     (delete
  100.         ("sys:locale/catalogs/Deutsch/MUI.catalog")
  101.         (help @deletefile-help)
  102.     )
  103. )
  104. )
  105.  
  106.  
  107.  
  108. ;***** Destination Directory Selection & Creation
  109. (complete 10)
  110.  
  111. (if (<> (exists "mui:" (noreq)) 0)
  112. (
  113.     (if (<> (exists "mui:MUI-Install" (noreq)) 0)
  114.     (
  115.         (set muimsg "Please select a place for \"MagicUserInterface\". A drawer called \"MUI\" will be created here. The minimum space required is about 500 kB, a complete installation takes 2.5 MB.")
  116.     )
  117.     (
  118.         (set @default-dest "mui:/")
  119.         (set muimsg "MUI is already installed on your system. Press \"Proceed\" to update your installation or select a different path for the \"MUI\" drawer.")
  120.     )
  121.     )
  122. )
  123. (
  124.     (set muimsg "Please select a place for \"MagicUserInterface\". A drawer called \"MUI\" will be created here. The minimum space required is about 500 kB, a complete installation takes 2.5 MB.")
  125. )
  126. )
  127.  
  128. (set @default-dest (expandpath @default-dest))
  129.  
  130. (set destination
  131.     (askdir
  132.         (prompt muimsg)
  133.         (help @askdir-help)
  134.         (default @default-dest)
  135.     )
  136. )
  137.  
  138. (set destination (tackon destination "MUI"))
  139.  
  140. (if (= (exists destination) 2)
  141. (message
  142.     "A MUI drawer does already exist in the selected directory. By selecting \"Proceed\", "
  143.     "you indicate that you want to update the MUI installation with the "
  144.     "most recent version. Several MUI specific files will be overwritten!"
  145. )
  146. )
  147.  
  148. (makedir destination
  149.     (help @makedir-help)
  150.     (infos)
  151. )
  152. (run (cat "copy " "/MUI.info \"" destination ".info\""))
  153.  
  154. ;***** ReadMe Files
  155. (complete 15)
  156.  
  157. (copyfiles
  158.     (prompt "Installing ReadMe files...")
  159.     (source "")
  160.     (pattern "(LiesMich|ReadMe)")
  161.     (dest destination)
  162.     (infos)
  163.     (help @copyfiles-help)
  164. )
  165.  
  166. ;***** Prefs Program
  167. (complete 20)
  168.  
  169. (copylib
  170.     (prompt "Installing Preferences Program...")
  171.     (source "MUI")
  172.     (dest destination)
  173.     (infos)
  174.     (help @copylib-help)
  175. )
  176.  
  177. ;***** Registration Program
  178. ;(complete 25)
  179. ;
  180. ;(copylib
  181. ;    (prompt "Installing Registration Program...")
  182. ;    (source "Docs/Registration")
  183. ;    (dest destination)
  184. ;    (infos)
  185. ;    (help @copylib-help)
  186. ;)
  187.  
  188. ;***** Master Library
  189. (complete 30)
  190.  
  191. (copylib
  192.     (prompt "Installing muimaster.library...")
  193.     (source "Libs/muimaster.library")
  194.     (dest (tackon destination "Libs"))
  195.     (help @copylib-help)
  196. )
  197. (run (cat "copy " "Libs.info \"" destination "\""))
  198.  
  199. ;***** External Classes
  200. (complete 35)
  201.  
  202. (foreach "Libs/MUI" "#?.(mui|mcc|mcp)"
  203.     (copylib
  204.         (prompt "Installing external classes...")
  205.         (source (tackon "Libs/MUI" @each-name))
  206.         (dest (tackon destination "Libs/MUI"))
  207.         (help @copylib-help)
  208.     )
  209. )
  210.  
  211.  
  212. ;***** Docs Drawer
  213. (complete 40)
  214.  
  215. (copyfiles
  216.     (prompt "Creating Docs Drawer...")
  217.     (source "Docs")
  218.     (dest (tackon destination "Docs"))
  219.     (choices "Registration" "Changes" "ImageDesign" "Preview")
  220.     (infos)
  221.     (help @copyfiles-help)
  222. )
  223. (run (cat "copy " "Docs.info \"" destination "\""))
  224.  
  225.  
  226. ;***** Icons Drawer
  227. (complete 45)
  228.  
  229. (copyfiles
  230.     (prompt "Creating Icons Drawer...")
  231.     (source "Icons")
  232.     (dest (tackon destination "Icons"))
  233.     (all)
  234.     (infos)
  235.     (help @copyfiles-help)
  236. )
  237. (run (cat "copy " "Icons.info \"" destination "\""))
  238.  
  239.  
  240. ;***** Choose Additional Stuff
  241. (complete 50)
  242.  
  243. (set choice
  244.     (askoptions
  245.         (prompt "Please choose which of the following parts to install. They are not absolutely required, but if you have enough space left, you shoud install them anyway.")
  246.         (choices "Additional Images" "English Documentation" "German Documentation" "Language Catalogs" "Example ARexx Scripts" "Demonstration Programs" "Developer Material")
  247.         (help @askoptions-help)
  248.     )
  249. )
  250.  
  251. (if (<> 0 (BITAND choice 2))
  252. (
  253.     (set echoice
  254.         (askoptions
  255.             (prompt "There are two formats available for the english documentation.")
  256.             (choices "AmigaGuide Format (required for online help)" "TeX DVI Format (for printed manuals)")
  257.             (help @askoptions-help)
  258.         )
  259.     )
  260. )
  261. )
  262.  
  263. (if (<> 0 (BITAND choice 4))
  264. (
  265.     (set gchoice
  266.         (askoptions
  267.             (prompt "There are two formats available for the german documentation.")
  268.             (choices "AmigaGuide Format (required for online help)" "TeX DVI Format (for printed manuals)")
  269.             (help @askoptions-help)
  270.         )
  271.     )
  272. )
  273. )
  274.  
  275.  
  276. ;***** Images
  277. (complete 55)
  278.  
  279. (if (<> 0 (BITAND choice 1))
  280. (
  281.     (copyfiles
  282.         (prompt "Installing additional ILBM images...")
  283.         (source "Images")
  284.         (dest (tackon destination "Images"))
  285.         (infos)
  286.         (all)
  287.         (help @copyfiles-help)
  288.     )
  289.     (run (cat "copy " "Images.info \"" destination "\""))
  290.     (foreach "Libs/Images" "#?"
  291.         (copylib
  292.             (prompt "Installing additional BOOPSI images...")
  293.             (source (tackon "Libs/Images" @each-name))
  294.             (dest (tackon destination "Libs/Images"))
  295.             (help @copylib-help)
  296.         )
  297.     )
  298. )
  299. )
  300.  
  301.  
  302. ;***** English Docs
  303. (complete 60)
  304.  
  305. (if (<> 0 (BITAND choice 2))
  306. (
  307.     (run (cat "copy " "Docs/English.info \"" (tackon destination "Docs") "\""))
  308.  
  309.     (if (<> 0 (BITAND echoice 1))
  310.     (
  311.         (copyfiles
  312.             (prompt "Installing english AmigaGuide manual...")
  313.             (source "Docs/English/MUI.guide")
  314.             (dest (tackon destination "Docs/English"))
  315.             (infos)
  316.             (help @copyfiles-help)
  317.         )
  318.     )
  319.     )
  320.  
  321.     (if (<> 0 (BITAND echoice 2))
  322.     (
  323.         (if (<> (exists "Docs/English/MUI.dvi") 0)
  324.         (
  325.             (copyfiles
  326.                 (prompt "Installing english DVI manual...")
  327.                 (source "Docs/English/MUI.dvi")
  328.                 (dest (tackon destination "Docs/English"))
  329.                 (infos)
  330.                 (help @copyfiles-help)
  331.             )
  332.         )
  333.         (
  334.             (message "Due to space limitations, the english DVI manual is not present on the disk distribution.")
  335.         )
  336.         )
  337.     )
  338.     )
  339.  
  340. ;    (if (<> 0 (BITAND echoice 4))
  341. ;    (
  342. ;        (copyfiles
  343. ;            (prompt "Installing english ASCII manual...")
  344. ;            (source "Docs/English/MUI.doc")
  345. ;            (dest (tackon destination "Docs/English"))
  346. ;            (infos)
  347. ;            (help @copyfiles-help)
  348. ;        )
  349. ;    )
  350. ;    )
  351. )
  352. )
  353.  
  354. ;***** German Docs
  355. (complete 65)
  356.  
  357. (if (<> 0 (BITAND choice 4))
  358. (
  359.     (run (cat "copy " "Docs/Deutsch.info \"" (tackon destination "Docs") "\""))
  360.  
  361.     (if (<> 0 (BITAND gchoice 1))
  362.     (
  363.         (copyfiles
  364.             (prompt "Installing german AmigaGuide manual...")
  365.             (source "Docs/Deutsch/MUI.guide")
  366.             (dest (tackon destination "Docs/Deutsch"))
  367.             (infos)
  368.             (help @copyfiles-help)
  369.         )
  370.     )
  371.     )
  372.  
  373.     (if (<> 0 (BITAND gchoice 2))
  374.     (
  375.         (if (<> (exists "Docs/Deutsch/MUI.dvi") 0)
  376.         (
  377.             (copyfiles
  378.                 (prompt "Installing german DVI manual...")
  379.                 (source "Docs/Deutsch/MUI.dvi")
  380.                 (dest (tackon destination "Docs/Deutsch"))
  381.                 (infos)
  382.                 (help @copyfiles-help)
  383.             )
  384.         )
  385.         (
  386.             (message "Due to space limitations, the german DVI manual is not present on the disk distribution.")
  387.         )
  388.         )
  389.     )
  390.     )
  391.  
  392. ;    (if (<> 0 (BITAND gchoice 4))
  393. ;    (
  394. ;        (copyfiles
  395. ;            (prompt "Installing german ASCII manual...")
  396. ;            (source "Docs/Deutsch/MUI.doc")
  397. ;            (dest (tackon destination "Docs/Deutsch"))
  398. ;            (infos)
  399. ;            (help @copyfiles-help)
  400. ;        )
  401. ;    )
  402. ;    )
  403. )
  404. )
  405.  
  406. ;***** Catalogs
  407. (complete 70)
  408.  
  409. (if (<> 0 (BITAND choice 8))
  410. (
  411.     (copyfiles
  412.         (prompt "Installing catalogs...")
  413.         (source "Locale")
  414.         (dest (tackon destination "Locale"))
  415.         (all)
  416.         (infos)
  417.         (help @copyfiles-help)
  418.     )
  419.     (run (cat "copy " "Locale.info \"" destination "\""))
  420. )
  421. )
  422.  
  423. ;***** Rexx Scripts
  424. (complete 75)
  425.  
  426. (if (<> 0 (BITAND choice 16))
  427. (
  428.     (copyfiles
  429.         (prompt "Installing example ARexx scripts...")
  430.         (source "Rexx")
  431.         (dest (tackon destination "Rexx"))
  432.         (infos)
  433.         (all)
  434.         (help @copyfiles-help)
  435.     )
  436.     (run (cat "copy " "Rexx.info \"" destination "\""))
  437. )
  438. )
  439.  
  440. ;***** Demo Programs
  441. (complete 80)
  442.  
  443. (if (<> 0 (BITAND choice 32))
  444. (
  445.     (copyfiles
  446.         (prompt "Installing demonstration programs...")
  447.         (source "Demos")
  448.         (dest (tackon destination "Demos"))
  449.         (infos)
  450.         (all)
  451.         (help @copyfiles-help)
  452.     )
  453.     (run (cat "copy " "Demos.info \"" destination "\""))
  454. )
  455. )
  456.  
  457. ;***** Developer Stuff
  458. (complete 85)
  459.  
  460. (if (<> 0 (BITAND choice 64))
  461. (
  462.     (if (<> (exists "Developer") 0)
  463.     (
  464.         (copyfiles
  465.             (prompt "Installing developer material...")
  466.             (source "Developer")
  467.             (dest (tackon destination "Developer"))
  468.             (infos)
  469.             (all)
  470.             (help @copyfiles-help)
  471.         )
  472.     (run (cat "copy " "Developer.info \"" destination "\""))
  473.     )
  474.     (
  475.         (message "The developer files are not present and cannot be installed. You have to get the 'muiXXdev.lha' archive and unpack it first.")
  476.     )
  477.     )
  478. )
  479. )
  480.  
  481.  
  482. ;***** Startup-Sequence
  483. (complete 95)
  484.  
  485. (startup "MUI"
  486.     (prompt "Some required commands will be added to your \"s:user-startup\" file.")
  487.     (help @startup-help)
  488.     (command "if exists \"" destination "\"\n")
  489.     (command "   assign MUI: \"" destination "\"\n")
  490.     (command "   if exists MUI:Libs\n")
  491.     (command "      assign add LIBS: MUI:Libs\n")
  492.     (command "   endif\n")
  493.     (command "   if exists MUI:Locale\n")
  494.     (command "      assign add LOCALE: MUI:Locale\n")
  495.     (command "   endif\n")
  496.     (command "   version >nil: exec.library 39\n")
  497.     (command "   if not warn\n")
  498.     (command "      if exists MUI:Docs\n")
  499.     (command "         if exists HELP:dummy ; do not remove\n")
  500.     (command "         endif                ; this entry!\n")
  501.     (command "         assign add HELP: MUI:Docs\n")
  502.     (command "      endif\n")
  503.     (command "   endif\n")
  504.     (command "endif")
  505. )
  506.  
  507.  
  508. ;***** Finished
  509. (complete 100)
  510.  
  511. (exit "Please reboot your computer before trying to start any MUI programs.")
  512.